﻿using MyCourseManager.Common;
using MyCourseManager.DataAccess.DataModel;
using SQLServelDAL.Base;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace MyCourseManager.DataAccess.DAL
{
    public class UsersDAL : BaseDAL<UsersInfo>
    {
        public UsersInfo checkUserinfo(string username, string pwd)
        {
            Thread.Sleep(2000);
            SqlParameter[] p = new SqlParameter[2];
            p[0] = new SqlParameter("@user_name", username);
            //p[1] = new SqlParameter("@password", MD5Provider.CreateMD5(pwd));
            p[1] = new SqlParameter("@password", pwd);

            return GetModel("user_name=@user_name and password=@password", "", p);
        }
    }
}
